package com.nineclock.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nineclock.system.pojo.SysUser;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface SysUserMapper extends BaseMapper<SysUser> {

    /**
     * 查询手机号 / 邮箱是否被占用
     * @param mobile
     * @param email
     * @return
     */
    @Select("select count(*) from sys_user where mobile = #{mobile} or email = #{email}")
    public Integer countByMobileAndEmail(@Param("mobile") String mobile , @Param("email") String email);

}
